<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Members | $rxTools</title>
    <meta name="description" content="校管家前端团队工具库">
    <script src="/tools/rx.tools.js"></script>
    
    <link rel="preload" href="/tools/assets/css/styles.a1269b41.css" as="style"><link rel="preload" href="/tools/assets/js/app.a1269b41.js" as="script"><link rel="preload" href="/tools/assets/js/7.86895104.js" as="script"><link rel="prefetch" href="/tools/assets/js/4.b52bbfe2.js"><link rel="prefetch" href="/tools/assets/css/1.styles.5a8ea794.css"><link rel="prefetch" href="/tools/assets/js/1.5a8ea794.js"><link rel="prefetch" href="/tools/assets/css/2.styles.35543169.css"><link rel="prefetch" href="/tools/assets/js/2.35543169.js"><link rel="prefetch" href="/tools/assets/js/3.15e12b4b.js"><link rel="prefetch" href="/tools/assets/js/5.39105aa8.js"><link rel="prefetch" href="/tools/assets/js/6.27ca699b.js"><link rel="prefetch" href="/tools/assets/js/8.d01f9c0e.js"><link rel="prefetch" href="/tools/assets/js/9.5494f412.js"><link rel="prefetch" href="/tools/assets/js/10.7f3024d4.js"><link rel="prefetch" href="/tools/assets/js/11.6790e062.js">
    <link rel="stylesheet" href="/tools/assets/css/1.styles.5a8ea794.css"><link rel="stylesheet" href="/tools/assets/css/2.styles.35543169.css"><link rel="stylesheet" href="/tools/assets/css/styles.a1269b41.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/tools/" class="home-link router-link-active"><!----> <span class="site-name">$rxTools</span></a> <div class="links" style="max-width:nullpx;"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <!----></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><!---->  <ul class="sidebar-links"><li><div class="sidebar-group first"><p class="sidebar-heading"><span>浏览器环境</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/tools/brower/env.html" class="sidebar-link">环境变量</a></li><li><a href="/tools/brower/event.html" class="sidebar-link">事件处理</a></li><li><a href="/tools/brower/element.html" class="sidebar-link">元素相关</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading open"><span>javascript 工具</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/tools/ext/array.html" class="sidebar-link">数组</a></li><li><a href="/tools/ext/date.html" class="sidebar-link">日期</a></li><li><a href="/tools/ext/number.html" class="sidebar-link">数值</a></li><li><a href="/tools/ext/object.html" class="sidebar-link">对象</a></li><li><a href="/tools/common.html" class="active sidebar-link">其他</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/tools/common.html#members" class="sidebar-link">Members</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#constants" class="sidebar-link">Constants</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isobject-⇒-boolean" class="sidebar-link">isObject ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isnumber-⇒-boolean" class="sidebar-link">isNumber ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isfunction-⇒-boolean" class="sidebar-link">isFunction ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isstring-⇒-boolean" class="sidebar-link">isString ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isundefined-⇒-boolean" class="sidebar-link">isUndefined ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isnull-⇒-boolean" class="sidebar-link">isNull ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isboolean-⇒-boolean" class="sidebar-link">isBoolean ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isfloat-⇒-boolean" class="sidebar-link">isFloat ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isint-⇒-boolean" class="sidebar-link">isInt ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#istel-⇒-boolean" class="sidebar-link">isTel ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#iswords-⇒-boolean" class="sidebar-link">isWords ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isbankcard-⇒-boolean" class="sidebar-link">isBankcard ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isidcard-⇒-boolean" class="sidebar-link">isIDCard ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#isemail-⇒-boolean" class="sidebar-link">isEmail ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#replaceroundanglenumber" class="sidebar-link">replaceRoundAngleNumber</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#unformartmoney-⇒-string" class="sidebar-link">unFormartMoney ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#hasemoji-⇒-boolean" class="sidebar-link">hasEmoji ⇒</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#ajax" class="sidebar-link">ajax</a></li><li class="sidebar-sub-header"><a href="/tools/common.html#slice-⇒-array" class="sidebar-link">slice ⇒</a></li></ul></li></ul></div></li></ul> </div> <div class="page"> <div class="content"><p>#Common</p> <h2 id="members"><a href="#members" aria-hidden="true" class="header-anchor">#</a> Members</h2> <dl><dt><a href="#isObject">isObject</a> ⇒ <code>Boolean</code></dt> <dd><p>判断目标是否为Object</p></dd> <dt><a href="#isNumber">isNumber</a> ⇒ <code>Boolean</code></dt> <dd><p>判断目标是否为Number</p></dd> <dt><a href="#isFunction">isFunction</a> ⇒ <code>Boolean</code></dt> <dd><p>判断目标是否为Function</p></dd> <dt><a href="#isString">isString</a> ⇒ <code>Boolean</code></dt> <dd><p>判断目标是否为String</p></dd> <dt><a href="#isUndefined">isUndefined</a> ⇒ <code>Boolean</code></dt> <dd><p>判断目标是否为undefined</p></dd> <dt><a href="#isNull">isNull</a> ⇒ <code>Boolean</code></dt> <dd><p>判断目标是否为Null</p></dd> <dt><a href="#isBoolean">isBoolean</a> ⇒ <code>Boolean</code></dt> <dd><p>判断目标是否为布尔类型</p></dd> <dt><a href="#isFloat">isFloat</a> ⇒ <code>Boolean</code></dt> <dd><p>是否浮点数</p></dd> <dt><a href="#isInt">isInt</a> ⇒ <code>Boolean</code></dt> <dd><p>是否整数</p></dd> <dt><a href="#isTel">isTel</a> ⇒ <code>Boolean</code></dt> <dd><p>是否电话号码</p></dd> <dt><a href="#isWords">isWords</a> ⇒ <code>Boolean</code></dt> <dd><p>是否数字字母组合</p></dd> <dt><a href="#isBankcard">isBankcard</a> ⇒ <code>Boolean</code></dt> <dd><p>是否银行卡</p></dd> <dt><a href="#isIDCard">isIDCard</a> ⇒ <code>Boolean</code></dt> <dd><p>是否身份证</p></dd> <dt><a href="#isEmail">isEmail</a> ⇒ <code>Boolean</code></dt> <dd><p>是否email</p></dd> <dt><a href="#replaceRoundAngleNumber">replaceRoundAngleNumber</a></dt> <dd><p>替换圆角输入的数值</p></dd> <dt><a href="#unFormartMoney">unFormartMoney</a> ⇒ <code>String</code></dt> <dd><p>撤销金额的格式化</p></dd> <dt><a href="#hasEmoji">hasEmoji</a> ⇒ <code>Boolean</code></dt> <dd><p>是否含有表情</p></dd> <dt><a href="#ajax">ajax</a></dt> <dd><p>请求对象</p> <p>1、全局配置</p></dd></dl> <h2 id="constants"><a href="#constants" aria-hidden="true" class="header-anchor">#</a> Constants</h2> <dl><dt><a href="#slice">slice</a> ⇒ <code>Array</code></dt> <dd><p>将类数组对象转成数组</p></dd></dl> <p><a name="isObject"></a></p> <h2 id="isobject-⇒-boolean"><a href="#isobject-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isObject ⇒ <code>Boolean</code></h2> <p>判断目标是否为Object</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th> <th>Description</th></tr></thead> <tbody><tr><td>target</td> <td><code>*</code></td> <td>验证目标</td></tr></tbody></table> <p><a name="isNumber"></a></p> <h2 id="isnumber-⇒-boolean"><a href="#isnumber-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isNumber ⇒ <code>Boolean</code></h2> <p>判断目标是否为Number</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th> <th>Description</th></tr></thead> <tbody><tr><td>target</td> <td><code>*</code></td> <td>验证目标</td></tr></tbody></table> <p><a name="isFunction"></a></p> <h2 id="isfunction-⇒-boolean"><a href="#isfunction-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isFunction ⇒ <code>Boolean</code></h2> <p>判断目标是否为Function</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th> <th>Description</th></tr></thead> <tbody><tr><td>target</td> <td><code>*</code></td> <td>验证目标</td></tr></tbody></table> <p><a name="isString"></a></p> <h2 id="isstring-⇒-boolean"><a href="#isstring-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isString ⇒ <code>Boolean</code></h2> <p>判断目标是否为String</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th> <th>Description</th></tr></thead> <tbody><tr><td>target</td> <td><code>*</code></td> <td>验证目标</td></tr></tbody></table> <p><a name="isUndefined"></a></p> <h2 id="isundefined-⇒-boolean"><a href="#isundefined-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isUndefined ⇒ <code>Boolean</code></h2> <p>判断目标是否为undefined</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th> <th>Description</th></tr></thead> <tbody><tr><td>target</td> <td><code>*</code></td> <td>验证目标</td></tr></tbody></table> <p><a name="isNull"></a></p> <h2 id="isnull-⇒-boolean"><a href="#isnull-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isNull ⇒ <code>Boolean</code></h2> <p>判断目标是否为Null</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th> <th>Description</th></tr></thead> <tbody><tr><td>target</td> <td><code>*</code></td> <td>验证目标</td></tr></tbody></table> <p><a name="isBoolean"></a></p> <h2 id="isboolean-⇒-boolean"><a href="#isboolean-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isBoolean ⇒ <code>Boolean</code></h2> <p>判断目标是否为布尔类型</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th> <th>Description</th></tr></thead> <tbody><tr><td>target</td> <td><code>*</code></td> <td>验证目标</td></tr></tbody></table> <p><a name="isFloat"></a></p> <h2 id="isfloat-⇒-boolean"><a href="#isfloat-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isFloat ⇒ <code>Boolean</code></h2> <p>是否浮点数</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th> <th>Description</th></tr></thead> <tbody><tr><td>val</td> <td><code>*</code></td> <td></td></tr> <tr><td>p</td> <td><code>Number</code></td> <td>小数点后几位</td></tr></tbody></table> <p><a name="isInt"></a></p> <h2 id="isint-⇒-boolean"><a href="#isint-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isInt ⇒ <code>Boolean</code></h2> <p>是否整数</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th></tr></thead> <tbody><tr><td>val</td> <td><code>*</code></td></tr></tbody></table> <p><a name="isTel"></a></p> <h2 id="istel-⇒-boolean"><a href="#istel-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isTel ⇒ <code>Boolean</code></h2> <p>是否电话号码</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th></tr></thead> <tbody><tr><td>val</td> <td><code>*</code></td></tr></tbody></table> <p><a name="isWords"></a></p> <h2 id="iswords-⇒-boolean"><a href="#iswords-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isWords ⇒ <code>Boolean</code></h2> <p>是否数字字母组合</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th></tr></thead> <tbody><tr><td>val</td> <td><code>*</code></td></tr></tbody></table> <p><a name="isBankcard"></a></p> <h2 id="isbankcard-⇒-boolean"><a href="#isbankcard-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isBankcard ⇒ <code>Boolean</code></h2> <p>是否银行卡</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th></tr></thead> <tbody><tr><td>val</td> <td><code>*</code></td></tr></tbody></table> <p><a name="isIDCard"></a></p> <h2 id="isidcard-⇒-boolean"><a href="#isidcard-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isIDCard ⇒ <code>Boolean</code></h2> <p>是否身份证</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th></tr></thead> <tbody><tr><td>val</td> <td><code>*</code></td></tr></tbody></table> <p><a name="isEmail"></a></p> <h2 id="isemail-⇒-boolean"><a href="#isemail-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> isEmail ⇒ <code>Boolean</code></h2> <p>是否email</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th></tr></thead> <tbody><tr><td>val</td> <td><code>*</code></td></tr></tbody></table> <p><a name="replaceRoundAngleNumber"></a></p> <h2 id="replaceroundanglenumber"><a href="#replaceroundanglenumber" aria-hidden="true" class="header-anchor">#</a> replaceRoundAngleNumber</h2> <p>替换圆角输入的数值</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th></tr></thead> <tbody><tr><td>val</td> <td><code>String</code></td></tr></tbody></table> <p><a name="unFormartMoney"></a></p> <h2 id="unformartmoney-⇒-string"><a href="#unformartmoney-⇒-string" aria-hidden="true" class="header-anchor">#</a> unFormartMoney ⇒ <code>String</code></h2> <p>撤销金额的格式化</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th></tr></thead> <tbody><tr><td>val</td> <td><code>String</code></td></tr></tbody></table> <p><a name="hasEmoji"></a></p> <h2 id="hasemoji-⇒-boolean"><a href="#hasemoji-⇒-boolean" aria-hidden="true" class="header-anchor">#</a> hasEmoji ⇒ <code>Boolean</code></h2> <p>是否含有表情</p> <p><strong>Kind</strong>: global variable</p> <table><thead><tr><th>Param</th> <th>Type</th></tr></thead> <tbody><tr><td>val</td> <td><code>*</code></td></tr></tbody></table> <p><a name="ajax"></a></p> <h2 id="ajax"><a href="#ajax" aria-hidden="true" class="header-anchor">#</a> ajax</h2> <p>请求对象</p> <p>1、全局配置</p> <p><strong>Kind</strong>: global variable<br> <strong>Example</strong></p> <div class="language-js extra-class"><pre class="language-js"><code>$rxTool<span class="token punctuation">.</span>ajax<span class="token punctuation">.</span><span class="token function">globalConfig</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
     onStart<span class="token punctuation">,</span>   <span class="token comment">//请求开始时调用的勾子</span>
     onComplete<span class="token punctuation">,</span><span class="token comment">//请求完成时调用的勾子</span>
     onParams<span class="token punctuation">,</span>  <span class="token comment">//请求之前的参数处理</span>
     onUrl<span class="token punctuation">,</span>     <span class="token comment">//请求之前的地址处理</span>
     onResult   <span class="token comment">// 请求结果处理（-1 不处理，String 当成错误结果处理，Object 当成结果处理）</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>

<span class="token number">2</span>、post、<span class="token keyword">get</span>、download
</code></pre></div><p><strong>Example</strong></p> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// return promise </span>
$rxTool<span class="token punctuation">.</span><span class="token punctuation">[</span>post<span class="token operator">|</span><span class="token keyword">get</span><span class="token operator">|</span>download<span class="token punctuation">]</span><span class="token punctuation">(</span>url<span class="token punctuation">,</span>params<span class="token punctuation">,</span>config<span class="token punctuation">)</span>
<span class="token comment">//config 的配置会覆盖global配置 完全不用global的配置可以 设置global=false</span>
</code></pre></div><p><a name="slice"></a></p> <h2 id="slice-⇒-array"><a href="#slice-⇒-array" aria-hidden="true" class="header-anchor">#</a> slice ⇒ <code>Array</code></h2> <p>将类数组对象转成数组</p> <p><strong>Kind</strong>: global constant</p> <table><thead><tr><th>Param</th> <th>Type</th> <th>Description</th></tr></thead> <tbody><tr><td>arrlike</td> <td><code>Object</code></td> <td>类似数组的对象</td></tr></tbody></table></div> <div class="page-edit"><!----> <!----></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/tools/ext/object.html" class="prev">
          对象
        </a></span> <!----></p></div> </div> <!----></div></div>
    <script src="/tools/assets/js/7.86895104.js" defer></script><script src="/tools/assets/js/app.a1269b41.js" defer></script>
  </body>
</html>
